Component({
  data: {
    selected: 0,
    color: "#383838",
    selectedColor: "#D43030",
    list:[
      {
        "pagePath": "/pages/tickets/tickets",
        "text": "鱼票",
        "iconPath": "/image/tabbar/tickets.png",
        "selectedIconPath": "/image/tabbar/ticketsActive.png",
        "id": "tickets"
      },
      {
        "pagePath": "/pages/index/index",
        "text": "首页",
        "iconPath": "/image/tabbar/home.png",
        "selectedIconPath": "/image/tabbar/homeActive.png",
        "id": "home"
      },
      {
        "pagePath": "/pages/self/self",
        "text": "我的",
        "iconPath": "/image/tabbar/self.png",
        "selectedIconPath": "/image/tabbar/selfActive.png",
        "id": 'self'
      }
    ]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
    }
  }
})